﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using QLTV_Data;
using QLTV_Public;

namespace QLTV_BLL
{
   public class TaiLieu_BLL
    {
       TaiLieu_Data taiLieu = new TaiLieu_Data();
       public DataTable LayDuLieu()
       {
           return taiLieu.LayDuLieu();
       }
       public DataTable load_TimKiem()
       {
           return taiLieu.Load_TimKiem();
       }
      
       public DataTable timkiem_MuonTaiLieu(MuonTra_Public maphieuMuon, PhieuMuon_Public maDocGia, TaiLieu_Public tenTaiLieu)
       {
           return taiLieu.TimKiem_MuonTaiLieu(maphieuMuon,maDocGia,tenTaiLieu);
       }
       public DataTable taoBang(string sql)
       {
           return taiLieu.TaoBang(sql);
       }
       public int insert_taiLieu(TaiLieu_Public tenTaiLieu, TaiLieu_Public tacGia, TaiLieu_Public maTheLoai, TaiLieu_Public maNhaXuatBan, TaiLieu_Public namXuatBan, TaiLieu_Public noiDung, TaiLieu_Public maNgonNgu, TaiLieu_Public soTrang, TaiLieu_Public lanTaiBan, TaiLieu_Public giaBia, TaiLieu_Public soLuong,/* TaiLieu_Public tinhTrang*/ TaiLieu_Public maViTri, TaiLieu_Public ngayCapNhat)
       {
           return taiLieu.insert_TaiLieu(tenTaiLieu,tacGia,maTheLoai,maNhaXuatBan,namXuatBan,noiDung,maNgonNgu,soTrang,lanTaiBan,giaBia,soLuong,/*tinhTrang*/maViTri,ngayCapNhat);
       }
       public int update_taiLieu(TaiLieu_Public maTaiLieu, TaiLieu_Public tenTaiLieu, TaiLieu_Public tacGia, TaiLieu_Public maTheLoai, TaiLieu_Public maNhaXuatBan, TaiLieu_Public namXuatBan, TaiLieu_Public noiDung, TaiLieu_Public maNgonNgu, TaiLieu_Public soTrang, TaiLieu_Public lanTaiBan, TaiLieu_Public giaBia, TaiLieu_Public soLuong, /*TaiLieu_Public tinhTrang*/ TaiLieu_Public maViTri, TaiLieu_Public ngayCapNhat)
       {
           return taiLieu.update_TaiLieu(maTaiLieu,tenTaiLieu, tacGia, maTheLoai, maNhaXuatBan, namXuatBan, noiDung, maNgonNgu, soTrang, lanTaiBan, giaBia, soLuong,/* tinhTrang, */maViTri, ngayCapNhat);
       }
       public int delete_taiLieu(TaiLieu_Public maTaiLieu)
       {
           return taiLieu.delete_TaiLieu(maTaiLieu);
       }
       public int update_TaiLieu_TinhTrang(TaiLieu_Public maTaiLieu,TaiLieu_Public tinhTrang)
       {
           return taiLieu.Update_TaiLieu_TinhTrang(maTaiLieu,tinhTrang);
       }
       public int update_TaiLieu_SoLuong(TaiLieu_Public maTaiLieu, TaiLieu_Public soLuong)
       {
           return taiLieu.update_TaiLieu_SoLuong(maTaiLieu, soLuong);
       }
    }
}
